package com.lostandfound.dao;

import java.io.Serializable;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lostandfound.entity.TestBean;

/**  
* 
*  
* @author xuao  
* @date 2018年3月9日
*/
@Repository("testDao")
public class TestDaoImpl implements TestDaoI {
    
    /**
     * 使用@Autowired注解将sessionFactory注入到UserDaoImpl中
     */
    @Autowired
    private SessionFactory sessionFactory;

	@Override
	public Serializable save(TestBean testBean) {
		// TODO Auto-generated method stub
        return sessionFactory.getCurrentSession().save(testBean);
	}
    
}
